#!/usr/bin/env perl

use lib qw{../config ../lib/perl};
use strict;
use warnings;
use CGI;
use Cwd;
use Util;
use TRFLP;

my $cgi = new CGI;
my $batch = $cgi->param('batch');
my $name = $cgi->param('sample');

chdir "$TRFLP::data_path/$batch" or die "Couldn't chdir to '$TRFLP::data_path/$batch', reason: $!";

-f "$name.peak" or die "file '$name.peak' does not exist";

print $cgi->header(-type => 'text/plain');
print `cat $name.peak`

